package com.authine.cloudpivot.ext.mapper;

import java.util.List;
import java.util.Set;

import com.authine.cloudpivot.ext.domain.OrgDepartment;
import com.authine.cloudpivot.util.MyMapper;

public interface OrgDepartmentMapper extends MyMapper<OrgDepartment> {

    List<OrgDepartment> selectTopDept();

    List<OrgDepartment> selectAll();

    OrgDepartment selectOneByPrimaryKey(String deptId);

    OrgDepartment selectByCorpIdAndName(String corpId, String name);

    List<OrgDepartment> selectByPrimaryKeyList(List<OrgDepartment> orgDepartmentList);

    Integer updateResetLeaf();

    Integer updateLeaf();

    Integer updateRootDepartmentLeaf();

    Integer updateQueryCode(OrgDepartment dept);

    Integer updateByDepartment(OrgDepartment orgDepartment);

    Integer updateByDepartmentList(List<OrgDepartment> orgDepartmentList);

    Integer insertByDepartment(OrgDepartment org);

    Integer insertByDepartmentList(List<OrgDepartment> orgDepartmentList);

    Set<String> selectByParentId(String departmentId);

    Integer deleteLogicByIdSet(Set<String> idSet);

    List<OrgDepartment> selectLikeQueryCode(String deptartmentId);

    List<OrgDepartment> selectByQueryCode(String queryCode);

    Integer delteLogicLikeQueryCode(String deptartmentId);

    String selectHeaderNumForVillageById(String id);

    List<OrgDepartment> selectDeptByParentId(String parentId);

    OrgDepartment selectDeptByName(String name);

}